package com.uubx.mapper;

import com.uubx.pojo.FeedBack;
import com.uubx.vo.BatchVo;
import com.uubx.vo.FeedBackVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface FeedBackMapper {
    //通过id查询资讯信息
    @Select("select status,createtime,category,presenter,phone,suggest,resultcontent from feedback where id=#{id}")
    FeedBack queryFeedBackById(Long id);

    //通过id删除
    @Delete("delete from feedback where id=#{id}")
    void deleteFeedBackById(Long id);
    //新增反馈信息
    @Insert("insert into feedback (createtime,category,presenter,phone,suggest,status) values (#{createtime},#{category},#{presenter},#{phone},#{suggest},#{status})")
    void saveFeedBack(FeedBack feedBack);
    //编辑反馈信息
    void updateFeedBack(FeedBack feedBack);

    //分页查询
    List<Map> queryAllFeedBack(FeedBackVo feedBackVo);
    //批量删除
    void BatchDeleteFeedBack(BatchVo batchVo);

}
